#include <iostream>
#include <string>
using namespace std;
int n, top, bot;
long long ans;
string s;
void maketree (int l, int r, int deep) {
	if (deep < bot) {
		return;
	}
	if (r > l) {
		int mid = (l + r) / 2;
		maketree (l, mid, deep - 1);
		maketree (mid + 1, r, deep - 1);
	}
	bool a = 1, b = 1;
	for (int i = l; i <= r; i++) {
		if (s[i] == '0') {
			b = 0;
		} else {
			a = 0;
		}
	}
	if (deep >= bot && deep <= top) {
		if (b) {
			ans += 5;
		} else if (a) {
			ans += 2;
		} else {
			ans += 1;
		}
	}
}
int main() {
	cin >> n >> top >> bot;
	cin >> s;
	maketree (0, s.size() - 1, n);
	cout << ans << endl;
	return 0;
}
